from rest_framework import serializers

from .models import Nav,Banner


class NavModelSerizlizer(serializers.ModelSerializer):
    class Meta:
        model = Nav
        fields = ["name","link","is_http"]


class BannerModelSerizlizer(serializers.ModelSerializer):
    """轮播广告序列化器"""
    class Meta:
        model = Banner
        fields = ["name","image","link","is_http"]